package com.uzai.common.enums;

import org.apache.commons.lang3.StringUtils;

/**
 * Redis缓存Key
 */
public enum RedisCacheKeyEnum {
    /**
     * 设备信息
     */
    DEVICE_INFO_WECHAT_PC(0,"device_info_wechat_pc_%s","PC端微信设备信息"),
    DEVICE_INFO_WECHAT_MOBLE(1,"device_info_wechat_moblie_%s","手机端微信设备信息"),
    DEVICE_INFO_WXWORK(2,"device_info_wxwork_%s","企业微信设备信息"),
    DEVICE_INFO_WXPUB(200,"device_info_wxpub_%s","公众号设备信息"),
    DEVICE_INFO_WXWORK_MOBLE(300,"device_info_wxwork_moblie_%s","手机版企业微信设备信息"),


    /**
     * 添加好友请求(第一位设备类型，第二位设备id，第三位wxid)
     */
    USER_ADD_ROBOT_REQ(3,"add_robot_req_%s_%s_%s","添加好友请求"),
    /**
     * 指令列表，%s是配置方案的唯一ID
     */
    COMMAND_LIST(4,"command_list_%s","指令列表"),
    /**
     * 插件，%s是插件id
     */
    PLUGIN(5,"sys_plugin_%s","插件"),
    /**
     * 运营商信息缓存
     */
    MERCHANT(6,"merchant_%s","运营商信息缓存"),
    /**
     * 当天接收添加好友请求数
     */
    TODAY_USER_ADD_REQ(7,"today_user_add_req_%s","当天接收添加好友请求数"),

    /**
     * 淘宝联盟 商品id 用户id
     */
    USER_ITEM_PID(8,"tb_user_item_pid_%s_%s_%s","用户维度作为key，记录查询详情"),
    /**
     * 淘宝联盟id 商品id pid
     */
    ITEM_PID(9,"tb_item_pid_%s_%s_%s","pid维度作为key，记录查询详情"),

    /**
     * 联盟pid队列（merId-userID）
     */
    TB_PIDS_QUEUE(10,"tb_pids_queue_%s_%s","联盟pid队列"),

    /**
     * 拼多多引导App查询
     */
    PDD_APP_QUERY_GUIDE(11,"pdd_app_query_guide_%s","引导App查询"),
    /**
     * 淘宝联盟id 商品id 会员id
     */
    ITEM_SID(12,"tb_item_sid_%s_%s_%s","会员id维度作为key，记录查询详情"),
    /**
     * 淘宝联盟id 商品id 渠道id
     */
    ITEM_RID(13,"tb_item_rid_%s_%s_%s","渠道id维度作为key，记录查询详情"),
    /**
     * 淘宝转链的最大佣金比例 联盟id、商品id、pid
     */
    TB_CACHE_MAX_RATE(14,"tb_item_rid_%s_%s_%s","淘宝转链的最大佣金比例"),
    /**
     * 手动提交订单号缓存
     */
    TB_SUB_ORDERNO_CACHE(15,"tb_order_no_%s","淘宝手动提交订单号缓存"),
    /**
     * 京东查券缓存 用户id，商品id
     */
    JD_TURNLINK_INFO(16,"jd_turnlink_info_%s_%s","京东查券缓存"),
    /**
     * 手动提交订单号缓存
     */
    JD_SUB_ORDERNO_CACHE(17,"jd_order_no_%s","京东手动提交订单号缓存"),
    /**
     * 唯品会查券缓存 用户id，商品id
     */
    VPH_TURNLINK_INFO(18,"vph_turnlink_info_%s_%s","唯品会查券缓存"),
    /**
     * 唯品会手动提交订单号缓存
     */
    VPH_SUB_ORDERNO_CACHE(19,"vph_order_no_%s","唯品会手动提交订单号缓存"),
    /**
     * 拼多多查券缓存 用户id，商品id
     */
    PDD_TURNLINK_INFO(20,"pdd_turnlink_info_%s_%s","拼多多查券缓存"),
    /**
     * 拼多多手动提交订单号缓存
     */
    PDD_SUB_ORDERNO_CACHE(21,"pdd_order_no_%s","拼多多手动提交订单号缓存"),

    /**
     * CMS基础配置信息
     */
    CMS_BASE_CONFIG(22,"cms_base_config_%s","CMS基础配置信息"),
    /**
     * 联盟pid队列维护锁
     */
    TB_PIDS_QUEUE_LOCK(23,"tb_pids_queue_lock_%s_%s","联盟pid队列"),

    /**
     * 超级问答发送次数
     */
    FAQ_SEND_COUNT(24,"faq_send_count_%s_%s","超级问答发送次数"),

    /**
     * 饿了么用户pid使用记录
     */
    ELM_USER_RID_PID(25,"elm_user_rid_pid_%s","饿了么用户pid使用记录"),
    /**
     * 饿了么pid,rid使用记录
     */
    ELM_RID_PID(26,"elm_rid_pid_%s_%s","饿了么pid,rid使用记录"),
    /**
     * 美团获取活动记录
     */
    MT_ACTI_INFO(27,"mt_acti_info_%s","美团获取活动记录"),
    /**
     * 设备消息回复配置信息
     */
    DEVICE_MSG_CONFIG(28,"device_msg_config_%s","设备消息回复配置信息"),

    /**
     * 客服账号发送消息配置-客服账号id替换%s
     */
    KEFU_SEND_MSG_CONFIG(29,"kefu_send_msg_config_%s","客服账号发送消息配置"),

    //七牛云配置
    QINIU_CONFIG(30,"qiniu_config_%s","七牛云配置"),

    //私域开启
    DEVICE_SWITCH(31,"device_switch_%s","已开启私域"),

    //私域开启
    PRODUCT_SWITCH(32,"product_switch_%s","已开启产品功能"),

    //机器人所属运营商（机器人微信id(wxid)-替换%s）
    DEVICE_MERCHANT(33,"device_merchant_%s","机器人所属运营商信息"),

    USER_ITEM_TOKEN(34,"user_item_token_%s_%s","用户查询商品的token"),

    //公众号token-参数为公众号appid
    WXPUB_TOKEN(35,"wxpub_token_%s","公众号授权token"),

    //公众号openid-参数为运营商id_随机6位key
    WXPUB_OPENID(36,"wxpub_openid_%s","公众号openid"),

    // 用户id缓存 merId、bizUserId
    WX_USER_ID(37,"wxuser_%s_%s","存储用户id"),

    // 淘宝购物车订单 merId、parentOrderNo
    TB_SHOPPING_CART(38,"tb_shopping_cart_%s_%s","淘宝购物车订单"),

    /**
     * 腾讯云对象存储配置
     */
    TENCENT_COS_CONFIG(39, "tencent_cos_config_%s","腾讯云对象存储配置"),

    /**
     * 文件云存储类型（0-未配置；1-七牛云；2-腾讯云）
     */
    FILE_SAVE_TYPE(40, "file_save_type_%s","文件云存储类型（0-未配置；1-七牛云-；2-腾讯云）"),

    /**
     * 短链接配置
     */
    SHORT_LINK_CONFIG(41, "short_link_config_%s","短链接配置"),

    /**
     * 淘宝店铺黑名单配置
     */
    TB_STORE_BLACKLIST_CONFIG(42, "tb_store_blacklist_config_%s","淘宝店铺黑名单配置"),

    /**
     * 会员黑名单基础配置
     */
    USER_BLACKLIST_CONFIG(43, "user_blacklist_config_%s","会员黑名单基础配置"),
    /**
     * 抖音cookie
     */
    DY_COOKIE(44, "dy_cookie_%s","抖音cookie"),
    /**
     * 提现限流
     */
    TAKEBAL_RATE_LIMIT(45, "takebal_rate_limit_%s","提现限流"),

    /**
     * 抖音查券缓存 用户id，商品id
     */
    DY_TURNLINK_INFO(46,"pdd_turnlink_info_%s_%s","拼多多查券缓存"),

    /**
     * CMS首页数据配置
     */
    CMS_HOMEPAGE_CONFIG(47,"cms_homepage_config_%s","CMS首页数据配置"),

    /**
     * 抖音订单缓存
     */
    DY_SUB_ORDERNO_CACHE(48,"dy_order_no_%s","抖音手动提交订单号缓存"),

    /**
     * 悠聊基础配置
     */
    UZAICHAT_BASE_CONFIG(49,"uzaichat_base_config_%s","悠聊基础配置"),

    /**
     * 系统默认商户id
     */
    SYS_DEFAULT_MERID(50,"sys_default_merid","系统默认商户id"),



    /**
     * 抖音订单前缀
     */
    DY_ORDER_PREFIX(51,"dy_order_prefix","抖音订单前缀"),

    // 不存在的订单号登记 merId、parentOrderNo
    ORDER_NO_REG(52,"order_no_reg_%s_%s","不存在的订单号登记"),
    // 最近的用户订单信息
    USER_ORDER_LIST(53,"user_order_list_%s","用户最近的订单信息"),

    /**
     * CMS个人中心数据配置-merId
     */
    CMS_PERSONAL_CENTER_CONFIG(54,"cms_personal_center_config_%s", "CMS个人中心数据配置"),

    /**
     * 社群黑名单基础配置-merId
     */
    WXQ_BLACKLIST_CONFIG(55, "wxq_blacklist_config_%s","社群黑名单基础配置"),

    /**
     * 事件监控配置-merId
     */
    ALARM_EVENT_CONFIG(56, "alarm_event_config_%s","事件监控配置"),

    /**
     * 微信群管理方案-%s是方案id
     */
    WXQ_MANAGEPLAN(57, "wxq_manageplan_%s","微信群管理方案"),

    /**
     * 微信群管理方案配置-merId_deviceid_groupwxid
     */
    WXGROUP_MANAGEPLAN_CONFIG(58, "wxgroup_manageplan_config_%s_%s_%s","微信群管理方案配置"),

    /**
     * 企业微信群管理方案-%s是方案id
     */
    WXQ_WORK_MANAGEPLAN(59, "wxq_work_manageplan_%s","企业微信微信群管理方案"),

    /**
     * 企业微信群管理方案配置-merId_deviceid_groupwxid
     */
    WXGROUP_WORK_MANAGEPLAN_CONFIG(60, "wxgroup_work_manageplan_config_%s_%s_%s","企业微信微信群管理方案配置"),

    /**
     * 企业微信社群黑名单基础配置-merId
     */
    WXQ_WORK_BLACKLIST_CONFIG(61, "wxq_work_blacklist_config_%s","社群黑名单基础配置"),

    /**
     * 登记支付宝打款验证-用户纬度
     */
    BIND_ALIPAY_USER_CHECK_RATE_LIMIT(62,"bind_alipay_user_check_rate_limit_%s","登记支付宝打款验证-用户纬度"),

    /**
     * 登记支付宝打款验证-运营商纬度
     */
    BIND_ALIPAY_MER_CHECK_RATE_LIMIT(63,"bind_alipay_mer_check_rate_limit_%s","登记支付宝打款验证-运营商纬度"),

    /**
     * 微信公众号用户 merId、bizUserId
     */
    WXPUB_USER_ID(100,"wxpub_user_%s_%s","微信公众号用户id"),




    /**
     *  悠聊客服链接id
     */
    CHAT_LINK_ID(105,"chat_link_%s","悠聊客服链接id"),

    /**
     * 手机端发送消息id
     */
    MOBILE_IM_MSG_ID(106,"mobile_im_msg_%s","手机端发送消息id"),
    /**
     * 拉群请求发送记录 Md5(merId+groupId+bizUserId)
     */
    PULL_WX_GROUP_REQ(107,"pull_wx_group_req_%s","拉群请求发送记录"),

    /**
     * 手机端被封账号名片发送列表 deviceUniqueId
     */
    MOBILE_IM_NAME_CARD_LIST(108,"mobile_im_name_card_list_%s","手机端被封账号名片发送列表"),

    /**
     * 手机端被封账号名片发送接收微信账号 deviceUniqueId , friendId
     */
    MOBILE_IM_NAME_CARD_RECEIVER(109,"mobile_im_name_card_receiver_%s_%s","手机端被封账号名片接收账号"),

    /**
     * 名片消息存储,被封账号 deviceUniqueId
     */
    MOBILE_IM_NAME_CARD_MSG(110,"mobile_im_name_card_msg_%s","手机端名片消息列表"),

    /**
     * 名片消息 Id
     */
    MOBILE_IM_NAME_MSG_ID(111,"mobile_im_name_msg_id_%s_%s","手机端名片消息Id"),

    /**
     * 企业微信用户 merId、bizUserId
     */
    WXWORK_USER_ID(112,"wxwork_user_%s_%s","企业微信用户id"),

    /**
     * 手机机器人上传联系人状态 deviceUniqueId
     */
    MOBILE_IM_UPLOAD_CONTACTS_STATUS(113,"mobile_im_upload_contacts_status_%s","手机机器人上传联系人状态"),

    /**
     * 这个key后面需要去掉(2024-02-05)
     * 企业微信新增好友锁，还没有收到添加成功的通知，就先收到一条聊天消息，导致注册会员走了add2接口。
     */
    ADD_FRIENDS_MESSAGE_LOCK(114,"add_friends_message_lock_%s_%s","新加好友第一条消息锁"),

    /**
     * 公众号超级指令触发 userId cmd
     */
    WXPUB_CMD_USER(115,"wxpub_cmd_user_%s_%s","公众号超级指令触发"),

    /**
     * 公众号虚拟开放平台id  PRINCIPAL_NAME (主题名称)
     */
    WXPUB_VIRTUAL_OPEN_ID (116,"wxpub_virtual_open_id_%s","公众号虚拟开放平台id"),

    /**
     * 公众号账号修改限流
     */
    WXPUB_UDATE_RATE_LIMIT(117, "wxpub_update_rate_limit_%s","公众号账号修改限流"),

    /**
     * 商户es索引ID
     */
    MER_ES_INDEX(120, "mer_es_index_%s", "商户es索引ID"),

    /**
     * 本地生活美团活动设置
     */
    LOCALLIVE_MEITUAN_ACTIVITY_SET(121, "locallive_meituan_activity_set_%s", "本地生活美团活动设置"),

    /**
     * 本地生活饿了么活动设置
     */
    LOCALLIVE_ELM_ACTIVITY_SET(122, "locallive_elm_activity_set_%s", "本地生活饿了么活动设置"),

    /**
     * 手机服务端登录后30秒 不发送信息
     */
    MOBILE_IM_SERVER_LOGIN(123, "mobile_im_server_login_%s", "设备id"),

    /**
     * 手机图片发送消息
     */
    MOBILE_PIC_MSG(124, "mobile_pic_msg_%s", "手机图片发送消息 大图上传"),

    /**
     * 手机服务端联系人/群列表清除缓存
     */
    MOBILE_UPLOAD_CLEAN(125, "mobile_upload_clean_%s", "userType(联系人/群), time (时间戳) "),

    /**
     * 群聊名称缓存
     */
    MOBILE_CHAT_ROOM_NAME(126, "mobile_chat_room_name_%s", "群聊名称缓存  taskId "),

    /**
     * 商户es存储其他数据的索引缓存
     */
    MER_ES_OTHER_DATA_INDEX(136, "mer_es_other_data_index_%s", "商户es存储数据的索引缓存"),

    /**
     * 客服设置信息
     */
    REDIS_KEFU_INFO_ID(137, "redis_kefu_info_cs_id_%s", "客服设置信息 kefu_user id"),


    /**
     * 免单指令列表，%s是运营商唯一ID
     */
    MD_COMMAND_LIST(138,"md_command_list_%s","免单指令列表"),


    /**
     * 免单配置方案PID列表，%s是运营商唯一ID
     */
    MD_CONFIGPLAN_PID_LIST(139,"md_configplan_pid_list_%s","免单配置方案PID列表"),

    /**
     * 企业微信通过验证再添加好友开关，%s是机器人唯一ID
     */
    QWECHAT_PASS(140,"qwechat_pass_%s","企业微信通过验证再添加好友开关"),

    /**
     * 手机端软件版本信息
     */
    MOBILE_APP_UPDATE_INFO(141,"mobile_app_update_info","手机端软件版本信息"),

    /**
     * 获取带openID的红包链接参数
     */
    REDPACK_OPENID_PARAM(142,"redpack_openid_param_%s","获取带openID的红包链接参数"),

    /**
     * 朋友圈跟发任务缓存key
     */
    CIRCLE_FOLLOW_TASK_CACHE_KEY(143,"circle_follow_task_cache","朋友圈跟发任务缓存key"),

    TB_SIMPLE_TURNLINK_KEY(144,"tb_simple_turnlink_%s_%s","简版转链信息"),

    /**
     * 发单跟发任务缓存key,参数为_运营商id_监控机器人设备id_群wxid_群成员wxid
     */
    FD_FOLLOW_TASK_CACHE_KEY(145, "fd_follow_task_cache_%s_%s_%s_%s", "发单跟发任务缓存key"),

    /**
     * 风险监控key,参数为_运营商id
     */
    ALARM_RISK_CONFIG(146, "alarm_risk_config_%s", "风险监控配置"),

    /**
     * 气氛组自动发单跟发任务缓存key,参数为_运营商id_监控机器人设备id_群wxid_群成员wxid
     * 内容为{"fdFollowConfigQfId":12313131313,"keywords":[{"keyword":"关键词1","type":0},{"keyword":"关键词2","type":1}]}
     */
    FD_FOLLOW_QF_TASK_CACHE_KEY(147,"fd_follow_qf_task_cache_%s_%s_%s_%s","气氛组跟发任务缓存key"),

    /**
     * 朋友圈缓存
     * <p>
     * 第一个%s: 微信ID
     * 第二个%s: 朋友圈ID
     */
    CIRCLE_CACHE(148, "circle_%s_%s", "朋友圈缓存信息"),

    /**
     * 朋友圈评论缓存
     * <p>
     * 第一个%s: 微信ID
     * 第二个%s: 朋友圈ID
     */
    CIRCLE_COMMENTS_CACHE(149, "circle_comment_%s_%s", "朋友圈评论缓存信息"),

    /**
     * 红包发送缓存
     * <p>
     * 第一个%s: 微信ID
     * <p>
     * 第二个%s: taskId
     */
    RED_PACKET_SEND_CACHE(150, "red_packet_send_%s_%s", "红包发送缓存key"),

    /**
     * 顺序拉群记录的缓存（记录当前需要用的群）
     */
    ORDER_PULL_GROUP_CACHE(160, "order_pull_group_%s_%s", "顺序拉群的缓存key(模块+设备id)"),

    /**
     * 进群再次营销缓存记录，进群后获取缓存写入消息队列
     */
    JOINGROUP_REMARKETING_CONF_CACHE(161, "joingroup_remarketing_conf_cache_%s_%s_%s_%s", "进群再次营销的配置缓存"),

    /**
     * 饿了么活动缓存
     */
    ELM_ACTIVITY_REQ(162, "elm_activity_req_%s", "饿了么活动缓存"),

    /**
     * 手机app名称缓存key
     */
    MOBILE_APP_NAME_CACHE_KEY(163, "mobile_app_name_cache_key", "手机APP应用缓存"),
    /**
     * 拼多多简版转链信息
     */
    PDD_SIMPLE_TURNLINK_KEY(164, "pdd_simple_turnlink_%s_%s", "拼多多简版转链信息"),

    /**
     * 发单跟发采集群任务缓存key,参数为:群wxid
     */
    FD_FOLLOW_GROUP_TASK_CACHE_KEY(165, "fd_follow_group_task_cache_%s", "发单跟发采集群任务配置缓存key"),
    USER_ACTIVATE_CACHE_KEY(166, "user_activate_cache_%s", "用户激活key"),

    MD_RANK_CACHE_KEY(167, "md_rank_cache_%s", "免单排行榜缓存key"),
    MD_GROUP_RANK_CACHE_KEY(168, "md_group_rank_cache_%s", "免单群排行榜缓存key"),

    /**
     * 增加抖音试用权限运营商列表(数据保存的是运营商id列表JSON字符串)
     */
    DY_DEVICE_AUTH_MERCHAN_LIST(169, "dy_opt_auth_merchan_list", "具有抖音设备使用权限的运营商列表"),

    /**
     * 抖音设备缓存_%s 参数是机器人唯一id
     */
    DEVICE_INFO_TIKTOK(201,"device_info_tiktok_%s","抖音设备缓存信息"),
    /**
     * 抖音群管理方案_%s 参数是配置方案id
     */
    TIKTOK_MANAGEPLAN(202, "tiktok_manageplan_%s","抖音配置方案数据"),
    /**
     * 抖音群管理方案配置_merId_deviceid_conversationId
     */
    TIKTOK_GROUP_MANAGEPLAN_CONFIG(203, "tiktok_group_manageplan_config_%s_%s_%s","抖音群管理方案配置"),

    /**
     * 淘宝定向计划配置信息_%s 参数是运营商id
     */
    TB_EXCLUSIVE_PLAN_CONFIG(204,"tb_exclusive_plan_config_%s","淘宝定向计划配置信息"),

    /**
     * 企业微信群二维码 参数(merId_deviceId_groupID)
     */
    WXWORK_GROUP_QRCODE(205,"wxwork_group_qrcode_%s","企业微信群二维码"),

    /**
     * APP基础配置信息
     */
    APP_BASE_CONFIG(206, "app_base_config_%s", "APP基础配置信息"),


    /**
     * APP个人中心数据配置-merId
     */
    APP_PERSONAL_CENTER_CONFIG(207,"app_personal_center_config_%s", "APP个人中心数据配置"),


    /**
     * 会员提现自动查询下一条开关-merId
     */
    USER_TAKE_BLA_FIND_NEXT_FLAG(208,"user_take_bla_find_next_flag_%s", "会员提现自动查询下一条开关"),

    /**
     * 主动检查僵尸粉缓存(参数为：merId_deviceid_wxid,值为新的通讯录备注
     */
    ZOMBIE_FAN_CHECK(209, "zombie_fan_check_%s_%s_%s", "主动检查僵尸粉缓存"),

    /**
     * 加进群好友配置(参数为：merId)
     */
    WXQ_ADD_FRIEND_CONFIG(210, "wxq_add_friend_config_%s", "加进群好友配置"),

    /**
     * 个人微信社群超级管理员配置信息
     */
    WECHAT_WXQ_SUPER_ADMIN_CONFIG(211,"wechat_wxq_super_admin_config_%s","个人微信社群超级管理员配置信息"),

    /**
     * 企业微信社群超级管理员配置信息
     */
    WXWORK_WXQ_SUPER_ADMIN_CONFIG(212,"wxwork_wxq_super_admin_config_%s","企业微信社群超级管理员配置信息"),

    /**
     * 敏感词配置
     */
    SENSITIVE_WORD_CONFIG(213, "sensitive_word_config_%s","敏感词配置"),

    /**
     * 企业手机端软件版本信息
     */
    WXWORK_MOBILE_APP_UPDATE_INFO(214,"wxwork_mobile_app_update_info","企业微信手机端软件版本信息"),

    /**
     * 添加被动僵尸粉发送验证消息（参数为机器人唯一id）
     */
    ADD_ZOMBIE_FANPASSIVE_SEND_MSG(215,"add_zombie_fanpassive_send_msg_%s","添加被动僵尸粉发送验证消息"),

    /**
     * 用于下载群图片大图的判断
     * 保存该运营商所有配置发单跟发任务群wxid列表,参数为_运营商id,有效期1个月
     */
    FD_FOLLOW_TASK_GROUPWXID_LIST_DOWNLOAD_IMG(216, "fd_follow_task_groupwxid_list_download_img_%s", "保存该运营商所有配置发单跟发任务群wxid列表,用于下载群图片大图的群判断"),

    // 用户id缓存 merId、bizUserId
    APP_USER_ID(500, "appuser_%s_%s", "存储app用户id"),


    DEVICE_INFO_APP(501, "device_info_app_%s", "APP设备信息"),

    DING_DING_EXCLUSIVE_GROUP(502, "ding_ding_exclusive_group", "钉钉专属群设置"),

    DING_TALK_OAUTH_ACCESS_TOKEN(503, "ding_talk_oauth_access_token", "钉钉获取专属群accessToken"),

    GREAT_PROMOTION_MIDDLE_PAGE_LINK(504, "great_promotion_middle_page_link", "大促中间页链接"),

    DING_DING_WARNING_GROUP(505, "ding_ding_warning_group", "钉钉报警群设置"),

    /**
     * 企业微信开放平台授权缓存
     */
    WXWORK_OPENAPI_ACCESS_TOKEN(600, "wxwork_openapi_access_token_%s", "企业微信开发平台授权缓存"),

    APP_DEVICE_AUTH_MERCHAN_LIST(601, "app_opt_auth_merchan_list", "具有APP设备使用权限的运营商列表"),
    /**
     * 营销标签缓存
     */
    MARKETING_TAG(602, "marketing_tag_%s", "营销标签缓存"),

    /**
     * 营销标签回复语缓存(参数为merId)
     */
    MARKETING_TAG_REPLY(603, "marketing_tag_reply_%s", "营销标签回复语缓存"),
    WX_TBORDER_TAILNUM_ID(604,"wx_tb_tailnum_%s_%s","淘宝订单尾号用户缓存"),
    TB_CACHE_QUERY_COMMISSION(605,"tqc%s%s%s","淘宝查券佣金"),
    DY_MD_INFO(606,"dymd_%s","抖音免单"),
    KS_TURNLINK_INFO(607,"ks_tl_info_%s","快手查券信息"),
    KS_SUB_ORDERNO_CACHE(608,"ks_order_no_%s","快手手动提交订单号缓存"),
    KS_MD_INFO(609,"ksmd_%s","快手免单"),
    //参数为群wxid
    WX_GROUP_MEMBER_COUNT(610,"wxgmc_%s","微信群成员数"),

    // 微信小程序用户id缓存 merId、bizUserId
    MINI_USER_ID(611, "miniuser_%s_%s", "存储小程序用户id"),
    /**
     * 微信小程序页面配置信息_参数为merId
     */
    MINI_PAGE_CONFIG(612,"mini_page_config_%s","微信小程序页面配置信息"),
    /**
     * SOP提现风控报警_参数为merId
     */
    SOP_RISK_ALARM(613,"sop_risk_alarm_%s","SOP提现风控报警信息"),

    /**
     * 注册用户的定向标签
     */
    REG_USER_SYS_TAG(614,"rust_%s_%s","注册用户的定向标签"),

    /**
     * SOP提现风控报警_参数为merId
     */
    SOP_RISK_ALARM_ORDER(615,"sop_risk_alarm_order_%s","SOP订单风控报警信息"),

    ;
    private Integer id;
    private String key;
    private String desc;

    RedisCacheKeyEnum(Integer id, String key, String desc) {
        this.id = id;
        this.key = key;
        this.desc = desc;
    }
    public String getKey() {
        return key;
    }
    public String getDesc() {
        return desc;
    }
    public Integer getId() {
        return id;
    }

    public static RedisCacheKeyEnum getByKey(String key) {
        if (StringUtils.isBlank(key)) {
            return null;
        }
        for (RedisCacheKeyEnum type: RedisCacheKeyEnum.values()) {
            if (type.getKey().equals(key)) {
                return type;
            }
        }
        return null;
    }
    public static RedisCacheKeyEnum getById(Integer id) {
        if (id==null) {
            return null;
        }
        for (RedisCacheKeyEnum type: RedisCacheKeyEnum.values()) {
            if (type.getId().intValue() == id) {
                return type;
            }
        }
        return null;
    }
}
